const path = require('path')

const resolve = dir => path.join(__dirname, dir)

const BASE_URL = process.env.NODE_ENV === 'production' ? '/' : '/'

module.exports = {
  lintOnSave: false,
  baseUrl: '/',
  chainWebpack: config => {
    config.resolve.alias
      .set('@', resolve('src'))
      .set('_c', resolve('src/components'))
  },
  // 打包时不生成.map文件
  productionSourceMap: false,
  devServer: {
    //proxy: 'http://localhost:3000' 
    proxy: {
      //配置跨域
      '/api/*': {
          target: "http://host805098507.s396.pppf.com.cn",
          ws:true,
          changOrigin:true,
          pathRewrite:{
              '^/api':'/'
          }
      }
  }
  }
}
